
Version:=3.0.STABLE25
ModuleName:=squid

Objcet:=$(ModuleName).tgz
ObjectDir:=$(ModuleName)-$(Version)
ObjcetSource:=$(ModuleName)-$(Version).tar.gz

Version2:=6.95
ModuleName2:=awstats

Objcet2:=$(ModuleName2).tgz
ObjectDir2:=$(ModuleName2)-$(Version2)
ObjcetSource2:=$(ModuleName2)-$(Version2).tar.gz

DependFiles:=

InstallDirTmp:=usr/local/
InstallDir:=/$(InstallDirTmp)
InstallLib:=$(InstallDirTmp)/lib
UserHome:=

Config:= ./configure

Error_file:=Armenian Azerbaijani Bulgarian \
	Catalan Czech  Danish Dutch \
	English Estonian Finnish French \
	German Greek Hebrew Hungarian Italian \
	Japanese Korean Lithuanian Polish \
	Portuguese Romanian Russian-1251 \
	Russian-koi8-r Serbian Slovak Spanish Swedish \
	Traditional_Chinese Turkish \
	Ukrainian-1251 Ukrainian-koi8-u Ukrainian-utf8

Patch:= 

.PHONY: all clean dist_clean

all:$(Objcet) 

$(Objcet):$(ObjcetSource) squid.conf
	tar -xzf $(ObjcetSource)
	$(Patch)
	cd $(ObjectDir) && $(Config)
	$(MAKE) -C $(ObjectDir) 
	$(MAKE) -C $(ObjectDir) install DESTDIR=`pwd`/
	$(g_STRIP)
	cd usr/local/squid/share/errors/ && rm -rf $(Error_file)
	rm -rf usr/local/squid/share/man
	cp -rf squid.conf usr/local/squid/etc/
	tar -cvzf $(Objcet) usr 

$(Objcet2):$(ObjcetSource2)
	tar -xzf $(ObjcetSource2)
	$(Patch)
	cd $(ObjectDir) && $(Config)
	$(MAKE) -C $(ObjectDir) 
	$(MAKE) -C $(ObjectDir) install DESTDIR=`pwd`/
	$(g_STRIP)
	cd usr/local/squid/share/errors/ && rm -rf $(Error_file)
	rm -rf usr/local/squid/share/man
	tar -cvzf $(Objcet) usr 

patch:
	mv $(ObjectDir) $(ObjectDir).new
	tar xzvf $(ObjcetSource)
	diff -Nur $(ObjectDir) $(ObjectDir).new > $(ObjectDir).patch

clean:
	rm -rf usr $(Objcet) etc 

dist_clean:clean
	rm -rf $(ObjectDir) $(ObjcetSource) *.tar.gz *.new *.tar.bz2
	
include ../Makefile.Res
